using Godot;
using System;

public partial class 区域碰撞检测2 : Area2D
{
    public float speed = 200f;
    public override void _PhysicsProcess(double delta)
    {
        var axisValue = Input.GetAxis("x", "c");
        if (axisValue > 0)
        {
            Position += new Vector2(-speed * (float)delta, 0);
        }
        if (axisValue < 0)
        {
            Position += new Vector2(speed * (float)delta,0);
        }
    }
}
